package com.gwtjs.icustom.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author : [aGuang]
 * @version : [v1.0]
 * @className : ClassEntity
 * @description : [班级实体]
 * @createTime : [2022/11/18 15:47]
 * @updateUser : [aGuang]
 * @updateTime : [2022/11/18 15:47]
 * @updateRemark : [描述说明本次修改内容]
 */
@Entity
@Table(name = "t_user" )
//添加表的注释
//@org.hibernate.annotations.Table(appliesTo = "t_user",comment = "用户表")
public class User {
	
	@Id @GeneratedValue(strategy=GenerationType.IDENTITY) //自动生成
    @Column(name = "id",columnDefinition = "bigint(20) COMMENT '主键'",nullable = false)//定义字段名和类型以及长度和备注，和是否允许为null
    private int id;
	
	@Column(name="account",nullable = false,columnDefinition = "varchar(255) COMMENT '用户登陆帐户'")
    private String account;
	@Column(name="password",nullable = false,columnDefinition = "varchar(255) COMMENT '用户登陆密码'")
    private String password;
    @Column(name="username",nullable = false,columnDefinition = "varchar(255) COMMENT '用户名'")
    private String username;
    @Column(name="address",nullable = false,columnDefinition = "varchar(255) COMMENT '用户地址'")
    private String address;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
    
    public User() {
    }

    public User(String account,String password) {
        this.account = account;
        this.password = password;
    }

    public User(String account,String password,String username) {
        this.username = username;
        this.account = account;
        this.password = password;
    }

    public User(int id,String account,String password,String username) {
        this.id = id;
        this.username = username;
        this.account = account;
        this.password = password;
    }

    public User(int id,String account,String password) {
        this.id = id;
        this.account = account;
        this.password = password;
    }

    public User(int id,String username,String account,String password,String address) {
        this.id = id;
        this.username = username;
        this.account = account;
        this.password = password;
        this.address = address;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", account='" + account + '\'' +
                ", password='" + password + '\'' +
                ", address='" + address + '\'' +
                '}';
    }

}
